﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SimpleDesktop
{
    public partial class WaitingForm : Form
    {
        static int amount = 0;
        public WaitingForm()
        {
            InitializeComponent();
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            // 禁用最大化按钮
            this.MaximizeBox = false;
            this.StartPosition = FormStartPosition.CenterScreen;
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Program.MainForm.FormHashCode = 0;
            this.Close();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            amount = (amount + 1) % 4;
            StringBuilder builder = new StringBuilder();
            builder.Append("等待中");
            for (int i = 0; i < amount; i++)
            {
                builder.Append('.');
            }
            label1.Text = builder.ToString();
        }
    }
}
